home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / xyos2shl.zip / XYOS2SHL.DOC < prev   
Text File  |  1996-06-03  |  49KB  |  1,034 lines

  1. «UFSTANDARD»«LM»«OF»«IP»«FD273LI»«PL273LI,273LI,273LI»«RM273DI»«PW273DI»
  2. Xy-OS/2 Shell (XYOS2SHL.ZIP) by R.J.Holmgren  12/25/95 Rev. 6/3/96
  3. == ==== =====
  4.  
  5.  
  6. N.B.  XYOS2SHL was developed using XyWrite IV for DOS v4.017
  7. = =   Although not extensively tested under XyWrite for Windows v4.012,
  8.         it seems to work properly
  9.       XYOS2SHL is designed for OS/2 v2.1x and v3.0 (Warp)
  10.       OS/2 v1.x and v2.0 will NOT work with XYOS2SHL
  11.       Signature may work, but XyWrite III+ will NOT work
  12.       STANDARD DISCLAIMERS apply across the boards.  If you are unwilling
  13.         to accept ALL risks associated with these programs -- which
  14.         undoubtedly contain bugs, and may do unpredictable things to your
  15.         system, and could even damage your OS2*.INI files or destroy your
  16.         WorkPlace Shell(!) -- then PLEASE ERASE IT NOW!  You are hereby
  17.         warned.  I accept no responsibility for damaging consequences to
  18.         you.  Do NOT experiment with or test-drive this program.  Stop NOW.
  19.  
  20. NOTICE: XYOS2SHL IS FREEWARE AND MAY BE FREELY DISTRIBUTED.
  21.         THERE ARE NO WARRANTIES WHATSOEVER; YOU ASSUME ALL RISKS.
  22.                   ^^ ^^^^^^^^^^             ^^^        ^^^ ^^^^^
  23. ======================
  24.  
  25. Do you yearn for the capacity to "shell to OS/2" in the same way that you
  26. formerly shelled to DOS (to execute DOS applications, BATch files,
  27. utilities) and then, on termination, returned automatically to XyWrite?
  28.  
  29. Here's my Xmas gift to you:  Shell to OS/2 to perform any native OS/2,
  30. MSWindows, or DOS task(s), individually or in combination, in background or
  31. foreground, full screen or windowed.  In short:
  32.  
  33.   launch OS/2 applications from the XyWrite command line
  34.   return to XyWrite automatically on completion of your OS/2 task(s)
  35.   one XyWrite keystroke does it all
  36.   start and maintain as many simultaneous OS/2 sessions as you wish
  37.   launched apps never consume memory in XyWrite's DOS session
  38.   start OS/2 filenames or objects(!)
  39.   no manual task switching (Alt-Esc, Ctrl-Esc)
  40.   no mousing around
  41.   no overt OS/2 interaction whatsoever (unless you intend otherwise)
  42.   add significant new power and possibility to XPL programming
  43.   prolong the life of a great DOS "legacy" app
  44.   EVEN:  control OS/2 from a XyWrite cockpit!
  45.  
  46. It seems improbable.  After all, DOS (and XyWrite running in a DOS box) is
  47. simply a child process of OS/2.  DOS can't spawn OS/2 processes.  Ho ho ho.
  48. Merry Christmas.
  49.  
  50. I've designed this "Xy-OS/2 Shell" (XYOS2SHL.ZIP) to be a close OS/2
  51. counterpart to XyWrite's DOS shell (the XyWrite commands DOS /C, DOS/NV/X,
  52. etc) and to XyWrite's command processor (Xy command DO, which replaces
  53. COMMAND.COM).  But optionally, and on-the-fly, Xy-OS/2 Shell is far more
  54. powerful than XyWrite's DOS shell ever was.  For example, you can spawn one
  55. or many separate OS/2 processes that persist independently even after you
  56. return to XyWrite; indeed, you can launch them without leaving XyWrite.
  57. Aliases or synonyms are prominent in XYOS2SHL.  Most interesting, you can
  58. launch OS/2 *objects* from XyWrite, which means that all the configurations
  59. and associations determined by a Settings Notebook are implemented, just as
  60. if you had clicked on an object's icon.  (Try _that_ in a Win95 word
  61. processor, ho ho ho.)
  62.  
  63.  
  64. The Commands:  O2 and SW
  65.     ========   ==     ==
  66. The basic XyWrite commands are O2 and SW.  Both O2 and SW have rudimentary
  67. BATch file counterparts (O2.BAT and SW.BAT) that simulate their XyWrite
  68. operation from the DOS command line.  SW has an OS/2 counterpart (SW.CMD)
  69. as well.
  70.  
  71. O2 launches (spawns) OS/2 (or DOS or Windows) processes from DOS or
  72. Windows.  O2 allows you to launch a process and then, on termination of
  73. that process, return to the original calling application.  Thus you can (if
  74. you wish) perform a fully automated "return trip", DOS ==> OS/2 ==> DOS, or
  75. XyWrite ==> OS/2 ==> XyWrite.
  76.  
  77. SW switches "focus" between processes of all types.  The current foreground
  78. application is said to have "focus".  You supply a portion (substring) of
  79. the Title of the process to which you wish to switch, and the SW command
  80. moves it into the foreground (brings it into focus -- on the Desktop, in a
  81. window, from minimized to foreground, etc).  SW is a powerful general
  82. facility, which switches focus to any application (it defaults to XyWrite).
  83. Among many other duties, SW accomplishes the "return" portion of the
  84. XyWrite ==> OS/2 ==> XyWrite round trip.
  85.  
  86. XYOS2SHL yields huge benefits to XPL programming.  O2 integrates easily
  87. into any XPL application (RexXPL!).  GO2.PM, PULLOS2.PM, and RUNCMD.PM are
  88. examples:
  89.  
  90. GO2 is a simple program that you assign to a keyboard key; it shells to a
  91.   full-screen OS/2 text session in XyWrite's current working directory
  92.   (ordinarily O2 opens OS/2 sessions in the Boot Drive's root directory).
  93. PULLOS2 collects output data from any OS/2 program, and then imports that
  94.   data into an [UNTITLED] XyWrite window (see instructions, below).
  95.   PULLOS2 is the OS/2 counterpart to Carl Distefano's PULL (for DOS).
  96. RUNCMD:  While composing OS/2 batch or Rexx code, you simply DeFine
  97.   ("Select") code fragments and then issue RUNCMD.PM to execute and test
  98.   them.  RUNCMD is the OS/2 counterpart of Carl Distefano's valuable tools
  99.   RUNBAT (for DOS) and RUNCODE (for XPL, and extensively utilized below
  100.   -- you should acquire a copy, in SmartSet v2.52+ [SMART25n.ZIP],
  101.   available at the same sites as REORGNZn.ZIP, q. v. below).
  102.  
  103.  
  104. Quick Install
  105. ===== =======
  106. Close XyWrite down (Quit).  UnZIP all XYOS2SHL files into a temporary
  107. directory.  Run INSTALL.CMD from that temporary directory (type "INSTALL"
  108. at an OS/2 command prompt).
  109.  
  110. N.B.:  You *MUST* run INSTALL; it writes the files!  INSTALL is NOT
  111. invasive; it does not change any OS/2 system file; its writes only to
  112. files dedicated to Xy-OS/2 Shell.
  113.  
  114. Change to the XyWrite directory.
  115.  
  116.   **If (only if) you DO have a pre-existing U2 file (e.g. called MY.U2)**
  117.     -- --------- --- -- ---- - ------------ -- ----
  118. issue these three commands from a DOS|OS/2 command prompt:
  119.  
  120. copy/a xyos2shl.u2+my.u2  ┐
  121. rename my.u2 my.bak       ├change "my.u2" to the name of your U2 file!
  122. rename xyos2shl.u2 my.u2  ┘
  123.  
  124. Reload XyWrite.  Make sure that a command like " é½load my.u2 é" or
  125. " é½(load my.u2)" exists in your STARTUP.INT or XWSTART.INT file.
  126.  
  127.   **If you do NOT have an existing U2 file**
  128.     -- --- -- --- ---- -- -------- -- ----
  129. call up STARTUP.INT or XWSTART.INT, and insert (copy!) this line into the
  130. INT file:
  131.  
  132.  é½load xyos2shl.u2 é;*;
  133.  
  134.   **KeyBoarD modifications**
  135.     -------- -------------
  136. Now CAll up your keyboard file, e.g. CA XY4.KBD.  Find an empty key in a
  137. convenient TABLE.  Enter this assignment (CoPy it exactly; substitute a key
  138. number for "nn") -- we'll call this your "OS/2 key":
  139.  
  140. nn=NOJM,2,.,g,o,2,Q2
  141.  
  142. I assign my "OS/2 key" to unshifted (TABLE= ) F11 (key 87), beside my
  143. "DOS key" on F12 (88=NOBX,d,o,s,/,n,v,/,z,Q2).
  144.  
  145. Lastly, those stragglers who don't yet have a parsing frame installed in
  146. KBD must find another empty key, which we'll call your "<Helpkey>".
  147. It launches routines in U2 based upon commands placed on the CMline:
  148.  
  149. nn=XHJM,2,.,P,r,s,C,M,l,i,n,e,Q2
  150.  
  151. SAve the KBD file.  Quit and reload XyWrite.
  152.  
  153.  
  154. What Does XYOS2SHL Do?
  155. ==== ==== ======== ==
  156. Experiment #1:
  157. ---------- --
  158. Clear the XyWrite command line.  Type "O2" (letter O number 2).  Hit your
  159. <Helpkey>.  You will shell to OS/2, i.e. arrive at an OS/2 fullscreen
  160. command prompt, in the root directory of OS/2's boot drive.  That's
  161. half of the loaf.  Now command "exit" in OS/2.  With luck you'll bounce
  162. right back to XyWrite.  That's the whole loaf.  (If you switched instead to
  163. the Window List on the Desktop, take a moment to write down the
  164. _*exact name*_ of XyWrite as it appears on the TaskList, so we can fix this
  165. misbehavior permanently.)
  166.  
  167. Experiment #2:
  168. ---------- --
  169. Don't clear the command line.  Just hit your "OS/2 key", configured
  170. earlier.  Again you shell to OS/2, but this time you'll be at an OS/2
  171. fullscreen prompt in the same drive and directory as XyWrite occupied
  172. when you issued the